home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 June / CHIP 2006-06.2.iso / program / driver / 6-4-igp_xp-2k_dd_ccc_wdm.exe / Data1.cab / _7F21BFD34E3746F18A4D8A60C4F6EC82 < prev    next >
Encoding:
Text File  |  2003-09-15  |  5.2 KB  |  212 lines

  1. // Copyright (c) 2000-2003 Quadralay Corporation.  All rights reserved.
  2. //
  3.  
  4. function  WWHBookGroups_Object()
  5. {
  6.   this.mbShowBooks      = false;
  7.   this.mbExpandAllAtTop = false;
  8.   this.mChildren        = new Array();
  9.  
  10.   this.fAddGrouping  = WWHBookGroups_AddGrouping;
  11.   this.fAddDirectory = WWHBookGroups_AddDirectory;
  12. }
  13.  
  14. function  WWHBookGroups_AddGrouping(ParamTitle,
  15.                                     bParamExpand,
  16.                                     ParamIcon,
  17.                                     ParamOpenIcon)
  18. {
  19.   var  bExpandBookGrouping;
  20.   var  BookGrouping;
  21.  
  22.  
  23.   // Set mbExpand to true if top entries are to be expanded
  24.   //
  25.   bExpandBookGrouping = false;
  26.   if ((typeof(bParamExpand) != "undefined") &&
  27.       (bParamExpand != null) &&
  28.       (bParamExpand == true))
  29.   {
  30.     bExpandBookGrouping = true;
  31.   }
  32.   else
  33.   {
  34.     if (this.mbExpandAllAtTop)
  35.     {
  36.       bExpandBookGrouping = true;
  37.     }
  38.   }
  39.  
  40.   BookGrouping = new WWHBookGroups_Group_Object(ParamTitle, bExpandBookGrouping, ParamIcon, ParamOpenIcon);
  41.  
  42.   // Add to children list
  43.   //
  44.   this.mChildren[this.mChildren.length] = BookGrouping;
  45.  
  46.   return BookGrouping;
  47. }
  48.  
  49. function  WWHBookGroups_AddDirectory(ParamDirectory,
  50.                                      bParamShow,
  51.                                      bParamExpand,
  52.                                      ParamIcon,
  53.                                      ParamOpenIcon)
  54. {
  55.   var  bExpandBookDirectory;
  56.   var  BookDirectory;
  57.  
  58.  
  59.   // Set mbExpand to true if top entries are to be expanded
  60.   //
  61.   bExpandBookDirectory = false;
  62.   if ((typeof(bParamExpand) != "undefined") &&
  63.       (bParamExpand != null) &&
  64.       (bParamExpand == true))
  65.   {
  66.     bExpandBookDirectory = true;
  67.   }
  68.   else
  69.   {
  70.     if (this.mbExpandAllAtTop)
  71.     {
  72.       bExpandBookDirectory = true;
  73.     }
  74.   }
  75.  
  76.   BookDirectory = new WWHBookGroups_Directory_Object(ParamDirectory, bParamShow, bExpandBookDirectory, ParamIcon, ParamOpenIcon);
  77.  
  78.   // Set mbShow to default values if not defined
  79.   //
  80.   if ((typeof(bParamShow) == "undefined") ||
  81.       (bParamShow == null))
  82.   {
  83.     BookDirectory.mbShow = this.mbShowBooks;
  84.   }
  85.  
  86.   // Add to children list
  87.   //
  88.   this.mChildren[this.mChildren.length] = BookDirectory;
  89. }
  90.  
  91. function  WWHBookGroups_Group_Object(ParamTitle,
  92.                                      bParamExpand,
  93.                                      ParamIcon,
  94.                                      ParamOpenIcon)
  95. {
  96.   this.mbGrouping = true;
  97.   this.mTitle     = ParamTitle;
  98.   this.mbExpand   = false;
  99.   this.mChildren  = new Array();
  100.  
  101.   this.fAddGrouping  = WWHBookGroups_Group_AddGrouping;
  102.   this.fAddDirectory = WWHBookGroups_Group_AddDirectory;
  103.  
  104.   // Set mbExpand if override defined
  105.   //
  106.   if ((typeof(bParamExpand) != "undefined") &&
  107.       (bParamExpand != null))
  108.   {
  109.     if (bParamExpand == true)
  110.     {
  111.       this.mbExpand = true;
  112.     }
  113.   }
  114.  
  115.   // Set mIcon if defined
  116.   //
  117.   if (typeof(ParamIcon) != "undefined")
  118.   {
  119.     this.mIcon = ParamIcon;
  120.   }
  121.  
  122.   // Set mOpenIcon if defined
  123.   //
  124.   if (typeof(ParamOpenIcon) != "undefined")
  125.   {
  126.     this.mOpenIcon = ParamOpenIcon;
  127.   }
  128. }
  129.  
  130. function  WWHBookGroups_Group_AddGrouping(ParamTitle,
  131.                                           bParamExpand,
  132.                                           ParamIcon,
  133.                                           ParamOpenIcon)
  134. {
  135.   var  BookGrouping;
  136.  
  137.  
  138.   BookGrouping = new WWHBookGroups_Group_Object(ParamTitle, bParamExpand, ParamIcon, ParamOpenIcon);
  139.   this.mChildren[this.mChildren.length] = BookGrouping;
  140.  
  141.   return BookGrouping;
  142. }
  143.  
  144. function  WWHBookGroups_Group_AddDirectory(ParamDirectory,
  145.                                            bParamShow,
  146.                                            bParamExpand,
  147.                                            ParamIcon,
  148.                                            ParamOpenIcon)
  149. {
  150.   var  BookDirectory;
  151.  
  152.  
  153.   BookDirectory = new WWHBookGroups_Directory_Object(ParamDirectory, bParamShow, bParamExpand, ParamIcon, ParamOpenIcon);
  154.   this.mChildren[this.mChildren.length] = BookDirectory;
  155. }
  156.  
  157. function  WWHBookGroups_Directory_Object(ParamDirectory,
  158.                                          bParamShow,
  159.                                          bParamExpand,
  160.                                          ParamIcon,
  161.                                          ParamOpenIcon)
  162. {
  163.   this.mbGrouping = false;
  164.   this.mDirectory = ParamDirectory;
  165.   this.mbShow     = true;
  166.   this.mbExpand   = false;
  167.  
  168.   // Set mbShow if override defined
  169.   //
  170.   if ((typeof(bParamShow) == "undefined") ||
  171.       (bParamShow == null))
  172.   {
  173.     this.mbShow = WWHFrame.WWHHelp.mBookGroups.mbShowBooks;
  174.   }
  175.   else
  176.   {
  177.     if (bParamShow == false)
  178.     {
  179.       this.mbShow = bParamShow;
  180.     }
  181.   }
  182.  
  183.   // Set mbExpand if override defined
  184.   //
  185.   if ((typeof(bParamExpand) != "undefined") &&
  186.       (bParamExpand != null))
  187.   {
  188.     if (bParamExpand == true)
  189.     {
  190.       this.mbExpand = bParamExpand;
  191.     }
  192.   }
  193.  
  194.   // Set mIcon if defined
  195.   //
  196.   if (typeof(ParamIcon) != "undefined")
  197.   {
  198.     this.mIcon = ParamIcon;
  199.   }
  200.  
  201.   // Set mOpenIcon if defined
  202.   //
  203.   if (typeof(ParamOpenIcon) != "undefined")
  204.   {
  205.     this.mOpenIcon = ParamOpenIcon;
  206.   }
  207.  
  208.   // Add to book list
  209.   //
  210.   WWHFrame.WWHHelp.mBooks.fInit_AddBookDir(ParamDirectory);
  211. }
  212.